package com.abel;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Hello world!
 *
 */
public class App{

    public static void main( String[] args ) throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {

        Class clazz = EchoService.class;
        Method method = clazz.getDeclaredMethod("saySomething", String.class);
        method.setAccessible(true);
        String ret = (String) method.invoke(clazz.newInstance(), "nihao");
        System.out.println(ret);

    }
}
